// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0.
// See the LICENCE file in the repository root for full licence text.

.beatmap-discussions {
  @_mode-circle-diameter: 15px;
  @_timeline-line-width: 3px;
  @_discussions-vertical-padding: 10px;
  @_discussions-horizontal-padding: 20px;
  @_timeline-colour: @osu-colour-b6;

  .default-box-shadow();
  background-color: @osu-colour-b4;
  display: flex;
  flex-direction: column;

  &__discussions {
    padding: @_discussions-vertical-padding @_discussions-horizontal-padding;
    background-color: @osu-colour-b5;
    position: relative;

    &--empty {
      font-size: @font-size--normal;
    }

    @media @mobile {
      padding: @_discussions-vertical-padding 0;
    }
  }

  &__mode {
    .reset-input();
    display: block;
  }

  &__mode-container {
    display: flex;
    align-items: center;
    padding: 5px 0;
  }

  &__mode-circle {
    .circle(@_mode-circle-diameter);
    background-color: @_timeline-colour;
    overflow-anchor: none;
  }

  &__mode-text {
    font-size: @font-size--small;
  }

  &__timeline-line {
    overflow-anchor: none;
    position: absolute;
    top: (@_discussions-vertical-padding + @_mode-circle-diameter / 2);
    left: @_discussions-horizontal-padding;

    width: @_timeline-line-width;
    height: calc(
      100% - (@_mode-circle-diameter + @_discussions-vertical-padding * 2)
    );

    margin: 0 ((@_mode-circle-diameter - @_timeline-line-width) / 2);

    background-color: @_timeline-colour;

    &--half {
      height: 50%;
    }

    &--bottom {
      top: 50%;
    }
  }

  &__toolbar {
    padding: 0 15px;
    display: flex;
    flex-direction: column;

    @media @desktop {
      flex-direction: row;
    }
  }

  &__toolbar-content {
    display: flex;

    &--right {
      flex: 1;
      justify-content: flex-end;
    }
  }

  &__toolbar-item {
    .reset-input();
    margin: 5px;

    &--link {
      .link-plain();
      .default-border-radius();
      font-size: @font-size--normal;
      color: white;
      padding: 5px 10px;

      &:hover {
        background-color: @osu-colour-b3;
      }
    }
  }

  &__toolbar-link-content {
    & + & {
      margin-left: 5px;
    }
  }
}
